// 车辆管理 - 备车流程设置
import { pget, ppostJson } from '@/utils/req';
import { modalApi } from '@/utils/modalReq';

// 备车流程列表
export function getTableList(query: any) {
  return pget(`${modalApi.carMessage}/assetsstandbyprocess/page`, query);
}

// 备车流程新增
export function addStandby(data: any) {
  return ppostJson(`${modalApi.carMessage}/assetsstandbyprocess/save`, data);
}

// 备车流程编辑
export function editStandby(data: any) {
  return ppostJson(`${modalApi.carMessage}/assetsstandbyprocess/update`, data);
}

// 备车流程删除
export function deleteStandby(ids: string) {
  return ppostJson(
    `${modalApi.carMessage}/assetsstandbyprocess/remove?ids=${ids}`,
  );
}

// 备车流程详情
export function viewStandby(query: any) {
  return pget(`${modalApi.carMessage}/assetsstandbyprocess/detail`, query);
}

// 获取备车流程节点
export function getNodeList() {
  return pget(`${modalApi.carMessage}/assetsstandbynodebase/list`);
}
